package com.entity;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;


/**
 * The persistent class for the ORDERDETAIL database table.
 * 
 */
@Entity
@NamedQuery(name="Orderdetail.findAll", query="SELECT o FROM Orderdetail o")
public class Orderdetail implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="ORDERDETAIL_ODID_GENERATOR", sequenceName="SEQ",initialValue=1,allocationSize=1)
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="ORDERDETAIL_ODID_GENERATOR")
	@Column(name="OD_ID")
	private long odId;

	@Column(name="OR_DELIVERNUM")
	private BigDecimal orDelivernum;

	@Column(name="OR_NUM")
	private BigDecimal orNum;

	@Column(name="OR_REMARK")
	private String orRemark;
	
	@Column(name="PRODUCT_ID")
	private String productid;

	//bi-directional many-to-one association to Order
	@ManyToOne
	@JoinColumn(name="OR_ID")
	private Order order;

	public Orderdetail() {
	}

	public long getOdId() {
		return this.odId;
	}

	public void setOdId(long odId) {
		this.odId = odId;
	}

	public BigDecimal getOrDelivernum() {
		return this.orDelivernum;
	}

	public void setOrDelivernum(BigDecimal orDelivernum) {
		this.orDelivernum = orDelivernum;
	}

	public BigDecimal getOrNum() {
		return this.orNum;
	}

	public void setOrNum(BigDecimal orNum) {
		this.orNum = orNum;
	}

	public String getOrRemark() {
		return this.orRemark;
	}

	public void setOrRemark(String orRemark) {
		this.orRemark = orRemark;
	}

	public Order getOrder() {
		return this.order;
	}

	public void setOrder(Order order) {
		this.order = order;
	}

	public String getProductid() {
		return productid;
	}

	public void setProductid(String productid) {
		this.productid = productid;
	}

	@Override
	public String toString() {
		return "Orderdetail [odId=" + odId + ", orDelivernum=" + orDelivernum + ", orNum=" + orNum + ", orRemark="
				+ orRemark + ", productid=" + productid + ", order=" + order + "]";
	}
	
	

}